﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace Quan_Ly_Phong_Kham_co_len_em
{
    public partial class frmdongialoaiDVCLS : Form
    {
        public frmdongialoaiDVCLS()
        {
            InitializeComponent();

            DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn();

          //  TV_Tonghop.Themcot("MA_LOAI_DVCLS", "Mã Loại Dịch Vụ", dt_dongiadvcls, DataGridViewAutoSizeColumnMode.Fill);
            TV_Tonghop.Themcot("TEN_LOAI_DVCLS", "Tên Dịch Vụ", dt_dongiadvcls, DataGridViewAutoSizeColumnMode.Fill);
            TV_Tonghop.Themcot("NGAY_THANG_NAM", "Ngày Áp Dụng", dt_dongiadvcls, DataGridViewAutoSizeColumnMode.Fill);
            TV_Tonghop.Themcot("DON_GIA_DV_CLS", "Đơn Giá Dịch Vụ", dt_dongiadvcls, DataGridViewAutoSizeColumnMode.Fill);
        }

        public SqlConnection getconnect()
        {
            return new SqlConnection("Data Source=NGUYENTY-PC\\SQLEXPRESS;Initial Catalog=QL_PHONGKHAM;Integrated Security=True");

        }

        private void dongialoaiDVCLS_Load(object sender, EventArgs e)
        {
            SqlConnection ketnoi = getconnect();
            SqlDataAdapter ad = new SqlDataAdapter("Select * from DON_GIA_XN_MAU", ketnoi); //ket noi den co so du lieu de goi ham da khai bao trong StoredProcedure
            DataTable dt = new DataTable();
            ad.Fill(dt);
            dt_dongiadvcls.DataSource = dt;
        }

        private void lb_nagyapdung_Click(object sender, EventArgs e)
        {

        }

        private void labelX1_Click(object sender, EventArgs e)
        {

        }

        private void dateTimeInput1_Click(object sender, EventArgs e)
        {

        }

        private void textBoxX3_TextChanged(object sender, EventArgs e)
        {

        }
    }
}
